package com.dhcc;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestDemo {
	private static final String RootPath="E:\\My_Excerise_Workspace\\Demo_QRcode\\src\\main\\resources\\QRCode";
    private static final String FileFormat=".png";
 
    private static final ThreadLocal<SimpleDateFormat> LOCALDATEFORMAT=ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmmss"));
    
    public static void main(String[] args) {
    	 final String fileName=LOCALDATEFORMAT.get().format(new Date());
    	 QRCodeUtil.createCodeToFile("http://www.baidu.com",new File(RootPath),fileName+FileFormat);
	}

}
